package com.atguigu.demo.repository;

import com.atguigu.demo.model.User;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface UserRepository  extends MongoRepository<User, ObjectId> {

    //继承父接口实现基本CURD

    //自定义方法 方法命名必须要遵从SpringData规范
    public List<User> findByName(String name);


    public List<User> findByNameLike(String name);



}
